from aiogram_dialog import Dialog, Window
from aiogram_dialog.widgets.kbd import Button, Cancel

from weed_shop.tg_bot.dialogs.widgets import LocaleText
from weed_shop.tg_bot.states.admin import LoyverseSyncSG

from .handlers import start_loyverse_sync

sync_menu_window = Window(
    LocaleText("select-sync-type"),
    Button(LocaleText("start-bot-to-loyverse-sync-btn"), "bot_to_loyverse", on_click=start_loyverse_sync),
    Button(LocaleText("start-loyverse-to-bot-sync-btn"), "loyverse_to_bot", on_click=start_loyverse_sync),
    Cancel(LocaleText("back-btn")),
    state=LoyverseSyncSG.menu,
)

loyverse_sync_dialog = Dialog(sync_menu_window)
